<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'bookcomments.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
	
	<h3>Book Title</h3>
	<form action="UpdateBookComment.do" method="post">
	<html:hidden name="book" property="isbn"/>
	<html:hidden name="comment" property="bookCommentId"/>
	<bean:write name="book" property="title"/>
	<h3>Comment:</h3>
	<html:textarea cols="50" rows="3" name="comment" property="comment"></html:textarea>
    <h3>Flagged?</h3>
    <select name="flag">
    <logic:equal name="comment" property="flagged" value="true">
    <option value="1" selected>Yes</option>
    <option value="0">No</option>    
    </logic:equal>
    <logic:equal name="comment" property="flagged" value="false">
    <option value="1">Yes</option>
    <option value="0" selected>No</option>    
    </logic:equal>
    </select>
    <input type="submit" value="change" />
    </form>
  </body>
</html>
